home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / misc / cvt-per.sed < prev    next >
Encoding:
Text File  |  1993-07-05  |  5.9 KB  |  105 lines  |  [TEXT/R*ch]

  1. s/^/;/
  2. s/^;[ ]*$//
  3. s/\[ /(/g
  4. s/ \]/)/g
  5. s/\[/(/g
  6. s/\]/)/g
  7. /Xconq/s/^;Xconq . [+-]* \(.*\)$/(game-module "???"\
  8.   (blurb "\1")\
  9.   )\
  10. /
  11. /period/s/;\(.*\) period-name/(game-module (title \1))/
  12. /utype/s/;"\(.\)" "\(.*\)" "\(.*\)" utype/(unit-type \1 (name "\2") (char "\1")\
  13.   (help "\3"))/
  14. /rtype/s/;"\(.\)" "\(.*\)" "\(.*\)" rtype/(material-type |\2| (help "\3"))/
  15. /ttype/s/;"\(.\)" "\(.*\)" "\(.*\)" ttype/(terrain-type |\2| (char "\1") (color "\3"))/
  16. /icon-name/s/;\(.*\) \(.*\) icon-name[ ]*$/(add \2 image-name \1)/
  17. /define/s/;\(.*\) "\(.*\)" define/(define \2 \1)/
  18.  
  19. $a\
  20. (game-module (instructions (\
  21. \ \ )))\
  22. (game-module (notes (\
  23. \ \ )))\
  24. (game-module (design-notes (\
  25. \ \ )))
  26. /^;[ ]*end[ ]*$/d
  27. /edge-terrain/s/;\(.*\) edge-terrain[ ]*$/(set edge-terrain \1)/
  28. /country-size/s/;\(.*\) country-size[ ]*$/(set country-radius-min \1)/
  29. /country-min-distance/s/;\(.*\) country-min-distance[ ]*$/(set country-separation-min \1)/
  30. /country-max-distance/s/;\(.*\) country-max-distance[ ]*$/(set country-separation-max \1)/
  31. /min-alt/s/;\([^ ()]*\) \([^ ()]*\) min-alt[ ]*$/(add \2 alt-percentile-min \1)/
  32. /min-alt/s/;\([^ ()]\) \((.*)\) min-alt[ ]*$/(add \2 alt-percentile-min \1)/
  33. /min-alt/s/;\((.*)\) \([^ ()]*\) min-alt[ ]*$/(add \2 alt-percentile-min \1)/
  34. /min-alt/s/;\((.*)\) \((.*)\) min-alt[ ]*$/(add \2 alt-percentile-min \1)/
  35.  
  36. /max-alt/s/;\([^ ()]*\) \([^ ()]*\) max-alt[ ]*$/(add \2 alt-percentile-max \1)/
  37. /max-alt/s/;\([^ ()]\) \((.*)\) max-alt[ ]*$/(add \2 alt-percentile-max \1)/
  38. /max-alt/s/;\((.*)\) \([^ ()]*\) max-alt[ ]*$/(add \2 alt-percentile-max \1)/
  39. /max-alt/s/;\((.*)\) \((.*)\) max-alt[ ]*$/(add \2 alt-percentile-max \1)/
  40.  
  41. /min-wet/s/;\([^ ()]*\) \([^ ()]*\) min-wet[ ]*$/(add \2 wet-percentile-min \1)/
  42. /min-wet/s/;\([^ ()]\) \((.*)\) min-wet[ ]*$/(add \2 wet-percentile-min \1)/
  43. /min-wet/s/;\((.*)\) \([^ ()]*\) min-wet[ ]*$/(add \2 wet-percentile-min \1)/
  44. /min-wet/s/;\((.*)\) \((.*)\) min-wet[ ]*$/(add \2 wet-percentile-min \1)/
  45.  
  46. /max-wet/s/;\([^ ()]*\) \([^ ()]*\) max-wet[ ]*$/(add \2 wet-percentile-max \1)/
  47. /max-wet/s/;\([^ ()]\) \((.*)\) max-wet[ ]*$/(add \2 wet-percentile-max \1)/
  48. /max-wet/s/;\((.*)\) \([^ ()]*\) max-wet[ ]*$/(add \2 wet-percentile-max \1)/
  49. /max-wet/s/;\((.*)\) \((.*)\) max-wet[ ]*$/(add \2 wet-percentile-max \1)/
  50.  
  51. /in-country/s/;\([^ ()]*\) \([^ ()]*\) in-country[ ]*$/(add \2 start-with \1)/
  52. /in-country/s/;\([^ ()]\) \((.*)\) in-country[ ]*$/(add \2 start-with \1)/
  53. /in-country/s/;\((.*)\) \([^ ()]*\) in-country[ ]*$/(add \2 start-with \1)/
  54. /in-country/s/;\((.*)\) \((.*)\) in-country[ ]*$/(add \2 start-with \1)/
  55.  
  56. /density/s/;\([^ ()]*\) \([^ ()]*\) density[ ]*$/(add \2 independent-density \1)/
  57. /density/s/;\([^ ()]\) \((.*)\) density[ ]*$/(add \2 independent-density \1)/
  58. /density/s/;\((.*)\) \([^ ()]*\) density[ ]*$/(add \2 independent-density \1)/
  59. /density/s/;\((.*)\) \((.*)\) density[ ]*$/(add \2 independent-density \1)/
  60.  
  61. /hp/s/;\([^ ()]*\) \([^ ()]*\) hp[ ]*$/(add \2 hp-max \1)/
  62. /hp/s/;\([^ ()]\) \((.*)\) hp[ ]*$/(add \2 hp-max \1)/
  63. /hp/s/;\((.*)\) \([^ ()]*\) hp[ ]*$/(add \2 hp-max \1)/
  64. /hp/s/;\((.*)\) \((.*)\) hp[ ]*$/(add \2 hp-max \1)/
  65.  
  66. /territory/s/;\([^ ()]*\) \([^ ()]*\) territory[ ]*$/(add \2 point-value \1)/
  67. /territory/s/;\([^ ()]\) \((.*)\) territory[ ]*$/(add \2 point-value \1)/
  68. /territory/s/;\((.*)\) \([^ ()]*\) territory[ ]*$/(add \2 point-value \1)/
  69. /territory/s/;\((.*)\) \((.*)\) territory[ ]*$/(add \2 point-value \1)/
  70.  
  71. /revolt/s/;\([^ ()]*\) \([^ ()]*\) revolt[ ]*$/(add \2 revolt-chance \1)/
  72. /revolt/s/;\([^ ()]\) \((.*)\) revolt[ ]*$/(add \2 revolt-chance \1)/
  73. /revolt/s/;\((.*)\) \([^ ()]*\) revolt[ ]*$/(add \2 revolt-chance \1)/
  74. /revolt/s/;\((.*)\) \((.*)\) revolt[ ]*$/(add \2 revolt-chance \1)/
  75.  
  76. /neutral/s/;\([^ ()]*\) \([^ ()]*\) neutral[ ]*$/(add \2 can-be-independent \1)/
  77. /neutral/s/;\([^ ()]\) \((.*)\) neutral[ ]*$/(add \2 can-be-independent \1)/
  78. /neutral/s/;\((.*)\) \([^ ()]*\) neutral[ ]*$/(add \2 can-be-independent \1)/
  79. /neutral/s/;\((.*)\) \((.*)\) neutral[ ]*$/(add \2 can-be-independent \1)/
  80.  
  81. /favored/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) favored[ ]*$/(add table favored-terrain (\3 \2 \1))/
  82. /foo/s/;\([^ ()]\) \((.*)\) favored[ ]*$/(add table favored-terrain (foo \2 \1))/
  83. /favored/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) favored[ ]*$/(add table favored-terrain (\3 \2 \1))/
  84. /foo/s/;\((.*)\) \((.*)\) favored[ ]*$/(add table favored-terrain (foo  \2 \1))/
  85. /hit/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) hit[ ]*$/(add table hit-chance (\3 \2 \1))/
  86. /foo/s/;\([^ ()]\) \((.*)\) hit[ ]*$/(add table hit-chance (foo \2 \1))/
  87. /hit/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) hit[ ]*$/(add table hit-chance (\3 \2 \1))/
  88. /foo/s/;\((.*)\) \((.*)\) hit[ ]*$/(add table hit-chance (foo  \2 \1))/
  89. /damage/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) damage[ ]*$/(add table damage (\3 \2 \1))/
  90. /foo/s/;\([^ ()]\) \((.*)\) damage[ ]*$/(add table damage (foo \2 \1))/
  91. /damage/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) damage[ ]*$/(add table damage (\3 \2 \1))/
  92. /foo/s/;\((.*)\) \((.*)\) damage[ ]*$/(add table damage (foo  \2 \1))/
  93. /hits-with/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) hits-with[ ]*$/(add table hits-with (\3 \2 \1))/
  94. /foo/s/;\([^ ()]\) \((.*)\) hits-with[ ]*$/(add table hits-with (foo \2 \1))/
  95. /hits-with/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) hits-with[ ]*$/(add table hits-with (\3 \2 \1))/
  96. /foo/s/;\((.*)\) \((.*)\) hits-with[ ]*$/(add table hits-with (foo  \2 \1))/
  97. /hit-by/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) hit-by[ ]*$/(add table hit-by (\3 \2 \1))/
  98. /foo/s/;\([^ ()]\) \((.*)\) hit-by[ ]*$/(add table hit-by (foo \2 \1))/
  99. /hit-by/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) hit-by[ ]*$/(add table hit-by (\3 \2 \1))/
  100. /foo/s/;\((.*)\) \((.*)\) hit-by[ ]*$/(add table hit-by (foo  \2 \1))/
  101. /capture/s/;\([^ ()]*\) \([^ ()]*\) \([^ ()]*\) capture[ ]*$/(add table capture-chance (\3 \2 \1))/
  102. /foo/s/;\([^ ()]\) \((.*)\) capture[ ]*$/(add table capture-chance (foo \2 \1))/
  103. /capture/s/;\((.*)\) \([^ ()]*\) \([^ ()]*\) capture[ ]*$/(add table capture-chance (\3 \2 \1))/
  104. /foo/s/;\((.*)\) \((.*)\) capture[ ]*$/(add table capture-chance (foo  \2 \1))/
  105.